package Week3.num.week3Test1.Level4_Project6;

public class Person {
    /**
     * 姓名
     */
    private String name;
    /**
     * 身高
     */
    private double height;
    /**
     * 年龄
     */
    private double age;

    /**
     * 空参构造
     */
    public Person() {
    }

    /**
     * 全参构造
     * @param name 姓名
     * @param height 身高
     * @param age 年龄
     */
    public Person(String name, double height, double age) {
        this.name = name;
        this.height = height;
        this.age = age;
    }

    /**
     *get和set方法
     */

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getAge() {
        return age;
    }

    public void setAge(double age) {
        this.age = age;
    }

    /**
     * 输出指定语句的方法
     */
    public void sayHello(){
        System.out.println("Hello,my name is "+name);
    }
}
